package com.mls.fivedistrict.server;

import com.baomidou.mybatisplus.mapper.Wrapper;
import com.mls.fivedistrict.pojo.Vote;
import com.baomidou.mybatisplus.service.IService;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 投票 服务类
 * </p>
 *
 * @author Five Team
 * @since 2018-05-15
 */
public interface VoteService extends IService<Vote> {

    boolean insertAndVoteOptions(Vote vote);

    boolean updateVoteAndVoteOption(Vote vote);

    Vote selectVoteAndVoteOption(Long voteId);

    List<Vote> selectListAndVoteOption(Wrapper wrapper);

    boolean addVoteCount(Long id, Long version, BigDecimal total, int voteCount);
}
